<%@page import="javax.servlet.descriptor.TaglibDescriptor"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>商家后台</title>
<jsp:include page="/base.jsp"/>
<link rel="stylesheet" href="assert/css/index.css">
<link rel="stylesheet" href="assert/jquery/uploadify/uploadifive.css">
<link rel="stylesheet" href="assert/jquery/treetable/css/jquery.treetable.css">
<link rel="stylesheet" href="assert/jquery/treetable/css/jquery.treetable.theme.default.css">

</head>
<body>
	<div class="continer">
			
		<div class="top">
			<h3>商城后台</h3>
		</div>
		
		<div class="left" id="div_left">
			<a href="user/goindex2">用户管理</a><br>
			<a href="catalog/index">目录管理</a><br>
			<a href="product/index">商品管理</a><br>
			<a href="">用户管理</a><br>
		</div>
		<div class="main" id="div_main">
			
			
		</div>
	</div>
</body>
<!-- 引入jQuery的开发包， 不许是1.8版本以上的 -->
<script type="text/javascript" src="assert/jquery/jquery-3.4.1.js"></script>

<script type="text/javascript" src="assert/jquery/treetable/jquery.treetable.js"></script>
<!-- 引入layer的开发包 -->
<script type="text/javascript" src="assert/layer/layer.js"></script>
<script type="text/javascript" src="assert/pagejs/user_index.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#div_left').off('click','a').on('click','a',function(){
	console.log(" a 超链接绑定了点击事件");
	var $a = $(this);
	var href = $a.attr('href');
	//拿到超链接 <a href="user/index">中的 user/index
	console.log(href);
	//
	$.ajax({
		url:href,
		success:function(indexHTML){
			//得到相应的模块主页的 HTML, 数据这些数据应该作为index.jsp页面的一部分
			console.log(indexHTML);
			$('#div_main').html(indexHTML);
		}
	});
	return false;
});
	$("#table_catalog").treetable({
		expandable:true
	}); 
});
</script>
</html>